package com.yc.cloud.model;

import com.alibaba.druid.sql.visitor.functions.Char;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author 杨智杰
 * @date 2021/8/13 14:19
 */
@Data
@Accessors(chain = true)
@ApiModel(value = "新增示例数据")
public class SaveDemo {

    @NotBlank
    @Length(min = 2, max = 12)
    @ApiModelProperty(value = "姓名")
    private String name;

    @NotNull
    @Min(1)
    @Max(100)
    @ApiModelProperty(value = "年龄")
    private Integer age;

    @NotNull
    @Min(0)
    @Max(1)
    @ApiModelProperty(value = "性别(0女, 1男)")
    private Integer six;

}
